#include <stdio.h>
int main()
{
    int n, score;
    int excellent = 0, normal = 0, bad = 0;
    scanf("%d", &n);
    for(int i = 1; i <= n; i++)
    {
        scanf("%d", &score);
        if(score >= 85)
        {
            excellent++;
        }else if(score >= 60)
        {
            normal++;
        }else
        {
            bad++;
        }
    }
    printf("%d %d %d", excellent, normal, bad);
    return 0;
}